
<div class="row">
	<div class="col-md-12">
		<div class="card">
			<div class="card-header">
				<h4 class="card-title">$modelName$ <small class="pull-right"><a href="$uri$/new">Create</a></small></h4>

				<form id="searchform" method="get">
					<div class="form-row">
						<div class="col">
							<div class="input-group no-border">
								<input name="$pk$" type="text" class="form-control" value="<?= $this->getQuery('$pk$') ?>">
							</div>
						</div>

						<div class="col">
							<div class="input-group no-border">
								<button type="submit" class="btn btn-primary">
									Search
								</button>
							</div>
						</div>
					</div>
				</form>
			</div>
			<div class="card-body">
				<div class="table-responsive">
					<table class="table table-bordered table-hover">
						<thead>
							<tr>
								<?php
								foreach ($item->getColumnMap() as $column) {
								?>
								<th><?= $column ?></th>
								<?php } ?>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<?php foreach ($page->items as $item) { ?>
							<tr>
								<?php
								foreach ($item->toArray() as $val) {
								?>
								<td><?= $val ?></td>
								<?php } ?>
								<td><div class="btn-group">
												<a href="$uri$/edit/<?= $item->$pk$ ?>" class="btn btn-success">Edit</a>
												<a href="$uri$/del/<?= $item->$pk$ ?>" class="btn btn-success">Delete</a>
										</div></td>
							</tr>
							<?php } ?>
						</tbody>
					</table>
					<?php $this->partial("shared/paginator") ?>
				</div>
			</div>
		</div>
	</div>
</div>

